package com.youlu.campus.service.ad;

import com.youlu.campus.entity.UserActivityTaskAdsRecord;
import com.youlu.campus.entity.UserAdsRecord;
import com.youlu.campus.entity.UserPO;

import java.util.Date;

public interface UserAdsRecordService {

    UserAdsRecord create(UserAdsRecord req);

    boolean update(UserAdsRecord req);

    UserAdsRecord findById(String id);

    UserAdsRecord find(String userId, Date dayTime, String platfrom, String appId);
    /**
     * 开始看广告
     *
     * @param userId
     * @param date
     * @return
     */
    UserAdsRecord startViewAd(String userId,String adId, String platfrom, String appId, Date date);


    /**
     * 结束看广告
     *
     * @param id
     * @return
     */
    boolean endViewAd(UserPO userPO,String id,String appId,String platform);


    /**
     * 开始看广告
     *
     * @param userId
     * @return
     */
    UserActivityTaskAdsRecord startTaskViewAd(String activityId, String userId, String adId, String platfrom, String appId);

    void endTaskViewAd(UserPO userPO,String id);



}
